import React, { memo } from "react";
import { Carousel } from "antd-mobile";
import sty from "./sty.module.css";
const Slider = memo(({ banners }) => {
  console.log(banners);
  return (
    <Carousel
      className={sty.root}
      dots
      autoplay
      infinite
      autoplayInterval={3000}
    >
      {banners.map((v) => (
        <img alt="" key={v.targetId} src={v.imageUrl} />
      ))}
    </Carousel>
  );
});

export default Slider;
